package com.wyz.note.project.engine.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wyz.note.project.common.mapper.UserInfoMapper;
import com.wyz.note.project.common.pojo.UserInfo;
import com.wyz.note.project.common.service.UserInfoService;
import org.apache.dubbo.config.annotation.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;


/**
 * @Description:
 * @Author: wei yz
 * @Date: 2022/6/30 16:37
 */
@Component
@Service
public class UserServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> implements UserInfoService {

    private static final Logger log = LoggerFactory.getLogger(UserServiceImpl.class);

    @Override
    public IPage<UserInfo> getList(Integer pageNum, Integer pageSize) {
        log.info("参数：{}，{}", pageNum, pageSize);
        Page<UserInfo> page = new Page<>(pageNum, pageSize, true);
        return page(page, Wrappers.<UserInfo>lambdaQuery().eq(UserInfo::getDeleted, 2));
    }
}
